import sublime
import sublime_plugin


class ExampleCommand(sublime_plugin.TextCommand):
	def run(self, edit):
		self.view.insert(edit, 0, "Hello, World!")



import sublime
import sublime_plugin
from datetime import datetime

class InsertDatetimeCommand(sublime_plugin.TextCommand):
    def run(self, edit):
        # 获取当前时间，格式化为 "YYYY/MM/DD HH:MM:SS"
        now = datetime.now().strftime("%Y/%m/%d %H:%M:%S")
        # 构造插入的字符串
        insert_text = now + "\n" + "="*19 + "\n"
        # 在所有光标位置插入文本
        for region in self.view.sel():
            self.view.insert(edit, region.begin(), insert_text)
